home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Anwendungen / CManager / Developer / Autodoc / CManager_lib.doc next >
Encoding:
Text File  |  2004-01-31  |  8.4 KB  |  424 lines

  1. TABLE OF CONTENTS
  2.  
  3. CManager.library/CManager.library
  4. CManager.library/CM_AddEntry
  5. CManager.library/CM_AllocCMData
  6. CManager.library/CM_AllocEntry
  7. CManager.library/CM_FreeData
  8. CManager.library/CM_FreeEntry
  9. CManager.library/CM_FreeHandle
  10. CManager.library/CM_GetEntry
  11. CManager.library/CM_GetOption
  12. CManager.library/CM_GetString
  13. CManager.library/CM_LoadCurrentUserData
  14. CManager.library/CM_LoadData
  15. CManager.library/CM_SaveData
  16. CManager.library/CM_StartCManager
  17. CManager.library/CM_StartManager
  18. CManager.library/CManager.library
  19.  
  20. CManager.library offers an easy way to create a global bookmarks
  21. system.
  22.  
  23. It handles all the low level stuff to load and save a complete
  24. database of bookmarks.
  25.  
  26. If you are not developing a CManager application, you will need
  27. just a couple of functions such as CM_AddEntry(), to add an entry
  28. in a database and CM_StartManager() to start a CManager instance.
  29.  
  30. CManager.library is copyright by Simone Tellini.
  31. It was released and the terms of the GNU Public Licence II.
  32.  
  33. Version 21+ are written by and they are copyright by Alfonso
  34. Ranieri <alforan@tin.it>.
  35.  
  36. CManager.library/CM_AddEntry
  37.  
  38.    NAME
  39.     CM_AddEntry - adds an entry
  40.  
  41.    SYNOPSIS
  42.     result = CM_AddEntry(entry);
  43.     D0                   A0
  44.  
  45.     BOOL CM_AddEntry( APTR );
  46.  
  47.    FUNCTION
  48.     Add an entry to the current database.
  49.  
  50.     The entry is added at the head of its root group.
  51.  
  52.     Note that entry is copied.
  53.  
  54.    INPUTS
  55.     entry - the entry to add
  56.  
  57.    RESULT
  58.     result - a boolean
  59.  
  60. CManager.library/CM_AllocCMData
  61.  
  62.    NAME CM_AllocCMData - allocates and initializes a CMData
  63.                          structure
  64.  
  65.    SYNOPSIS
  66.     data = CM_AllocCMData();
  67.     D0
  68.  
  69.     struct CMData *CM_AllocCMData( void );
  70.  
  71.    FUNCTION
  72.     Allocate a CMData structure and initialize it. The result
  73.     returned must be freed with CM_FreeData() .
  74.  
  75.    INPUT
  76.     none
  77.  
  78.    RESULT
  79.     data - CMData structure ptr or NULL.
  80.  
  81.    SEE
  82.     CM_FreeData()
  83.  
  84. CManager.library/CM_AllocEntry
  85.  
  86.    NAME
  87.     CM_AllocEntry - allocates a CM entry
  88.  
  89.    SYNOPSIS
  90.     entry = CM_AllocEntry(type);
  91.     D0                    D0
  92.  
  93.     APTR CM_AllocEntry( ULONG );
  94.  
  95.    FUNCTION
  96.     Allocates a CM entry of Type type. The result returned must
  97.     be freed with CM_FreeEntry() .
  98.  
  99.    INPUT
  100.     type - the Type of the entry, one of CME_XXX values.
  101.  
  102.    RESULT
  103.     entry - the entry or NULL
  104.  
  105.    SEE
  106.     CM_FreeEntry()
  107.  
  108. CManager.library/CM_FreeData
  109.  
  110.    NAME
  111.     CM_FreeData - frees CMData
  112.  
  113.    SYNOPSIS
  114.     CM_FreeData(data);
  115.                 A0
  116.  
  117.     void CM_FreeData(APTR);
  118.  
  119.    FUNCTION
  120.     Frees data allocated with CM_AllocData() .
  121.  
  122.    INPUT
  123.     data - data to free
  124.  
  125.    RESULT
  126.     none
  127.  
  128.    SEE
  129.     CM_AllocData()
  130.  
  131. CManager.library/CM_FreeEntry
  132.  
  133.    NAME
  134.     CM_FreeEntry - frees a CM entry
  135.  
  136.    SYNOPSIS
  137.     CM_FreeEntry(entry);
  138.                  A0
  139.  
  140.     void CM_FreeEntry(APTR);
  141.  
  142.    FUNCTION
  143.     Frees an entry allocated with CM_FreeEntry() .
  144.  
  145.    INPUT
  146.     entry - the entry to free
  147.  
  148.    RESULT
  149.     none
  150.  
  151.    SEE
  152.     CM_AllocEntry()
  153.  
  154. CManager.library/CM_FreeHandle
  155.  
  156.    NAME
  157.     CM_FreeHandle - frees a CMHandle
  158.  
  159.    SYNOPSIS
  160.     CM_FreeHandle(handle);
  161.                   A0
  162.  
  163.     void CM_FreeHandle(APTR);
  164.  
  165.    FUNCTION
  166.     Frees a CMHandle, result of CM_StartManager() .
  167.  
  168.    INPUT
  169.     handle - the handle to free
  170.  
  171.    RESULT
  172.     none
  173.  
  174.    SEE
  175.     CM_StartManager()
  176.  
  177. CManager.library/CM_GetEntry
  178.  
  179.    NAME
  180.     CM_GetEntry - get an entry
  181.  
  182.     entry = CM_GetEntry(handle,flags);
  183.     D0                  A1     D0
  184.  
  185.     APTR CM_GetEntry(APTR,ULONG);
  186.  
  187.    FUNCTION
  188.     Get one entry from a CManager instance.
  189.  
  190.     handle is the result from a CM_StartManager() call.
  191.  
  192.     flags is a inclusive or of:
  193.  
  194.     - CMGE_USER
  195.     - CMGE_WWW
  196.     - CMGE_FTP
  197.     - CMGE_CHAT
  198.     - CMGE_TELNET
  199.       The entry to get is of one of the Type specified
  200.  
  201.     - CMGE_MULTISELECT
  202.       If supplied, the result is a struct MinList * , the nodes
  203.       of which are the entries selected; If not supplied, the
  204.       result is an APTR to the selected entry.
  205.  
  206.    INPUT
  207.     handle - a CMHandle
  208.     flags - see above
  209.  
  210.    RESULT
  211.     result - see above and be prepared to get NULL
  212.  
  213. CManager.library/CM_GetOption
  214.  
  215.    NAME
  216.     CM_GetOption - reads a single CManager.library option
  217.  
  218.     value = CM_GetOption(option);
  219.     D0                   D0
  220.  
  221.     ULONG CM_GetOption(ULONG);
  222.  
  223.    FUNCTION
  224.     Reads one CManager.library option.
  225.  
  226.     options is one of:
  227.  
  228.     - CMO_AvoidGenesis BOOL
  229.       Indicates if the env var CManager_AvoidGenesis is set to 1
  230.  
  231.    INPUT
  232.     option - the option to read
  233.  
  234.    RESULT
  235.     value - the value of option
  236.  
  237. CManager.library/CM_GetString
  238.  
  239.    NAME
  240.     CM_GetString - gets a localized CM string
  241.  
  242.    SYNOPSIS
  243.     str = CM_GetString(id);
  244.     D0                 D0
  245.  
  246.     STRPTR CM_GetString(ULONG);
  247.  
  248.    FUNCTION
  249.     Returns a localized CManager string.
  250.  
  251.    INPUT
  252.     id - the id of the string to get
  253.  
  254.    RESULT
  255.     str - the localized string, or ""
  256.  
  257. CManager.library/CM_LoadCurrentUserData
  258.  
  259.    NAME
  260.     CM_LoadCurrentUserData - load currents logged user data
  261.  
  262.    SYNOPSIS
  263.     data = CM_LoadCurrentUserData(ask);
  264.     D0                            D0
  265.  
  266.     struct CMData *CM_LoadCurrentUserData( BOOL );
  267.  
  268.    FUNCTION
  269.     Loads current Genesis logged user data.
  270.  
  271.     If ask is TRUE and there is no current user, the function
  272.     asks to the user to login. If Genesis is not installed in the
  273.     system or the environment var CManager_AvoidGenesis is set to
  274.     1, the function loads CManager Default.data . So the function
  275.     never fails, but if not enough memory is available.
  276.  
  277.    INPUT
  278.     ask - see above
  279.  
  280.    RESULT
  281.     data - a CMData structure ptr
  282.  
  283.    SEE
  284.     CM_FreeData()
  285.     CM_LoadData()
  286.  
  287. CManager.library/CM_LoadData
  288.  
  289.    NAME
  290.     CM_LoadData - loads CM data
  291.  
  292.    SYNOPSIS
  293.     result = CM_LoadData(path,data,user);
  294.     D0                   A0   A1   A2
  295.  
  296.     BOOL CM_LoadData( STRPTR, struct CMData *, STRPTR );
  297.  
  298.    FUNCTION
  299.     Loads CM data. data is filled; it must have been allocated
  300.     with CM_AllocCMData() (or setup by hands).
  301.  
  302.     path is the complete path to the file to load.
  303.  
  304.     if user is not NULL and not "", it must be the user that
  305.     saved the data.
  306.  
  307.    INPUT
  308.     path - complete path to the file to load
  309.     data - structure to fill
  310.     user - user that saved the data or NULL or ""
  311.  
  312.    RESULT
  313.     result - a boolean
  314.  
  315. CManager.library/CM_SaveData
  316.  
  317.    NAME
  318.     CM_SaveData - saves CM data
  319.  
  320.    SYNOPSIS
  321.      CM_SaveData(path,data,user);
  322.  
  323.      void CM_SaveData( STRPTR, struct CMData *, STRPTR );
  324.  
  325.    FUNCTION
  326.     Saves CMData stored in data.
  327.  
  328.     path is the complete path to the file to create.
  329.  
  330.     If user is not NULL, it is saved in the data; see
  331.     CM_LoadData().
  332.  
  333.    INPUT
  334.     path - complete path to the file to write
  335.     data - data to save
  336.     user - user to use
  337.  
  338.    RESULT
  339.     none
  340.  
  341.    SEE
  342.     CM_LoadData().
  343.  
  344. CManager.library/CM_StartCManagerA
  345.  
  346.    NAME
  347.     CM_StartCManagerA - starts a CManager istance
  348.  
  349.    SYNOPSIS
  350.     handle = CM_StartCManagerA(attrs)
  351.     D0                       A0   A1
  352.  
  353.     APTR CM_StartCManager( struct TagItems *);
  354.  
  355.     handle = CM_StartManager(tag1,...)
  356.     D0                       A0
  357.  
  358.     APTR CM_StartCManager( Tag1, ... );
  359.  
  360.    FUNCTION
  361.     Starts a CM instance and returns its handle. If you call
  362.     CM_FreeHandle(), the CM instance is closed. Remember to call
  363.     CM_FreeHandle() before closing CManager.library .
  364.  
  365.     The attributes you may pass are:
  366.  
  367.     - SCMA_File
  368.       The data to load, default NULL
  369.  
  370.     - SCMA_PubScreen
  371.       Public screen name to open on, default NULL
  372.  
  373.     - SCMA_HideUsers
  374.       Hide users, default FALSE
  375.  
  376.     - SCMA_HideWWW
  377.       Hide WWW sites, default FALSE
  378.  
  379.     - SCMA_HideFTP
  380.       Hide FTP sites, default FALSE
  381.  
  382.     - SCMA_HideChat
  383.       Hide chats, default FALSE
  384.  
  385.     - SCMA_HideTelnet
  386.       Hide telnet hosts, default FALSE
  387.  
  388.     This is the new version of CM_StartManager().
  389.     Use it in your application!.
  390.  
  391.    RESULT
  392.     handle - the CM handle or NULL
  393.  
  394.    SEE
  395.     CM_StartManager()
  396.  
  397. CManager.library/CM_StartManager
  398.  
  399.    NAME
  400.     CM_StartManager - starts a CManager instance
  401.  
  402.    SYNOPSIS
  403.     handle = CM_StartManager(file,screen);
  404.     D0                       A0   A1
  405.  
  406.     APTR CM_StartManager( STRPTR, STRPTR );
  407.  
  408.    FUNCTION
  409.     THIS FUNCTION IS OBSOLETE. Use CM_StartCManagerA().
  410.  
  411.     Starts a CM instance and returns its handle. If you call
  412.     CM_FreeHandle(), the CM instance is closed. Remember to call
  413.     CM_FreeHandle() before closing CManager.library .
  414.  
  415.    INPUT
  416.     file - data to load, may be NULL
  417.     screen - public screen name to open on, may be NULL
  418.  
  419.    RESULT
  420.     handle - the CM handle or NULL
  421.  
  422.    SEE
  423.     CM_StartCManagerA()
  424.